package cn.rkylin.core;

import com.github.pagehelper.PageInfo;

import cn.rkylin.core.exception.BusinessException;
import cn.rkylin.oms.base.refundReasonType.domain.RdfundReasonType;
import cn.rkylin.oms.system.project.domain.ProjectManager;

import java.util.List;
import java.util.Map;


/**
 * 自定义baseDao 增删改查方法
 */
public interface IDataBaseFactory {
	
	@SuppressWarnings("rawtypes")
	public PageInfo<ApolloRet> findByPage(int pageNo,int pageSize,String index,Map reqMap) throws Exception;
	@SuppressWarnings("rawtypes")
	public <E> List<E> findForList(String index,Map reqMap) throws Exception;
	@SuppressWarnings("rawtypes")
	public int delete(String index,Map map) throws Exception;
	@SuppressWarnings("rawtypes")
	public int insert(String index,Map map) throws Exception;
	@SuppressWarnings("rawtypes")
	public int insertBatch(String index,List paramList)throws Exception;
	@SuppressWarnings("rawtypes")
	public int update(String index,Map map) throws Exception;
	@SuppressWarnings("rawtypes")
	int count(String index, Map reqMap) throws Exception;
	<E> PageInfo<E> findPage(int pageNo, int pageSize, String sqlStatement, E paramObj) throws Exception;
	<E> List<E> findList(String pageStatement, String searchCondition) throws Exception;
	<E> List<E> findAllList(String statement, Object param) throws Exception;
	int insert(String insertStatement, Object entity) throws Exception;
	int update(String updateStatement, Object entity) throws Exception;
	int delete(String deleteStatement, Object entity) throws Exception;
	Object find(String findStatement, Object entity) throws Exception;
    public <T> T findForObject(String string, T param) throws BusinessException;
    public <E> List<E> findList(String pageStatement, Map<String, Object> params) throws BusinessException;
}
